package com.bogo.webhook.feign.request;

import com.fasterxml.jackson.annotation.JsonProperty;
import java.util.LinkedList;
import java.util.List;

public class WenxinRequest {

    private String source;
    private final String from = "openapi";
    private String openId;
    private final Message message = new Message();

    public String getSource() {
        return source;
    }

    public void setSource(String source) {
        this.source = source;
    }

    public String getFrom() {
        return from;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public Message getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message.content.value.showText = message;
    }

    public static class Message{
        private final Content content = new Content();

        public Content getContent() {
            return content;
        }

    }

    public static class Content{
        private final String type = "text";
        private final Value value = new Value();

        public String getType() {
            return type;
        }

        public Value getValue() {
            return value;
        }

    }

    public static class Value{
        private String showText;

        public String getShowText() {
            return showText;
        }

        public void setShowText(String showText) {
            this.showText = showText;
        }
    }
}
